import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/info/hot-topic/snippet/base/list',
    method: 'get',
    params: query
  })
}

export function fetchTopicSnippet(id) {
  return request({
    url: '/info/hot-topic/snippet/base/one',
    method: 'get',
    params: { id }
  })
}

export function createTopicSnippet(data) {
  return request({
    url: '/info/hot-topic/snippet/base',
    method: 'post',
    data
  })
}

export function updateTopicSnippet(data) {
  return request({
    url: '/info/hot-topic/snippet/base',
    method: 'put',
    data
  })
}

export function deleteTopicSnippet(id) {
  return request({
    url: '/info/hot-topic/snippet/base/' + id,
    method: 'delete'
  })
}
